﻿using System.Configuration;
using Inscriptionem.Configuration.Elements.Base;

namespace Inscriptionem.Configuration.Elements
{
    public class MailElement : BaseConfigurationElement
    {
        [ConfigurationProperty("server", DefaultValue = "", IsRequired = true)]
        public string Server
        {
            get
            {
                return (string)this["server"];
            }
            set
            {
                this["server"] = value;
            }
        }

        [ConfigurationProperty("sender", DefaultValue = "", IsRequired = true)]
        public string Sender
        {
            get
            {
                return (string)this["sender"];
            }
            set
            {
                this["sender"] = value;
            }
        }

        [ConfigurationProperty("login", DefaultValue = "", IsRequired = true)]
        public string Login
        {
            get
            {
                return (string)this["login"];
            }
            set
            {
                this["login"] = value;
            }
        }

        [ConfigurationProperty("password", DefaultValue = "", IsRequired = true)]
        public string Password
        {
            get
            {
                return (string)this["password"];
            }
            set
            {
                this["password"] = value;
            }
        }

        [ConfigurationProperty("ssl", DefaultValue = false, IsRequired = true)]
        public bool SSL
        {
            get
            {
                return (bool)this["ssl"];
            }
            set
            {
                this["ssl"] = value;
            }
        }

        [ConfigurationProperty("port", DefaultValue = 25, IsRequired = true)]
        public int Port
        {
            get
            {
                return (int)this["port"];
            }
            set
            {
                this["port"] = value;
            }
        }
    }
}